<template>
  <div class="context-menu">
    <ul>
      <li @click="handleGotoList('com')">查询企业</li>
      <li @click="handleGotoList('per')">查询人才</li>
      <li @click="handleGotoAnalysisTech('patent')">专利分析</li>
      <li @click="handleGotoAnalysisTech('paper')" >文献分析</li>
      <!-- <li class="source" >技术前沿领域分析</li>
      <li class="source" >技术生命周期</li>
      <li class="source" >技术成熟度分析</li>
      <li class="source" >技术趋势路线图</li> -->
    </ul>
  </div>
</template>

<script>
export default {
  props: {
    selectNodeInfo: {
      type: Object,
    },
    graph: {
      type: Object,
    },
  },
  data() {
    return {
      user: "",
    };
  },
  mounted() {
    let user = sessionStorage.getItem("ptLabelUser");
    if (user) {
      this.user = user;
    }
  },
  methods: {
    //跳转列表页
    handleGotoList(type){
      this.$emit('gotoList',type)
    },
    //跳转技术分析
    handleGotoAnalysisTech(txt){
      let label = '' , type = '' ;
      if( txt == 'patent' ){
        label = '专利分析';
        type = 'patent';
      }else if(txt == 'paper' ){
        label = '文献分析';
        type = 'paper';
      }
      this.$emit('handleGotoTech',{
        routerName:'Analysis',
        label:label,
        type:type,
        keyword:''
      })
    },

  },
};
</script>

<style lang="scss" scoped>
.context-menu {
  position: fixed;
  background-color:rgba(0,0,0,0.7);
  ul {
    max-width: 200px;
    li{
      color:#fff;
      line-height:30px;
      text-align:center;
      padding:0 20px;
      cursor:pointer;
      font-size:0.12rem;
      border-bottom:1px solid #fff;
      
    }
    // .source{
    //   color:#ccc
    // }
  }
}
@media \0screen\,screen\9 {
  .context-menu{
    background-color: #000;
    filter:Alpha(opacity=50);
    position:static;
    *zoom:1;
    li{
      position: relative;
    }
  }
}
</style>
